#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun May 28 10:14:30 2023

@author: liqingsimac
"""
import sympy as sy
import sympy.plotting as syp


x,y = sy.symbols('x,y')

p1 = syp.plot_implicit(2*x**2+4*x*y+5*y**2-11, (x,-4,4), (y,-4,4), show=False)
p2 = syp.plot_implicit(2*x-y, (x,-4,4), (y,-4,4), show=False)
p3 = syp.plot_implicit(x+2*y, (x,-4,4), (y,-4,4), show=False)


p1.save('pic/slides-9-4-4-ellipse.png')


'''
x1,x2=sy.symbols('x1,x2')

p1=syp.plot_implicit(-2*x1**2+8*x1*x2-2*x2**2-4, (x1,-4,4),(x2,-4,4),show=False)
p2=syp.plot_implicit(x1-x2, (x1,-4,4),(x2,-4,4),show=False)
p3=syp.plot_implicit(x1+x2, (x1,-4,4),(x2,-4,4),show=False)

p1.extend(p2)
p1.extend(p3)
p1.show()

p1.save('pic/exercise_parabola.png')
'''


'''
x,y=sy.symbols('x,y')

p1=syp.plot_implicit(x**2 + 2*y**2-10, (x,-4,4),(y,-4,4),show=False)

p1.show()

p1.save('pic/slides_ellipse_9_4_2.png')
'''
